import java.util.Stack;

public class Text {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        myStack.push(4);
        System.out.println(myStack.peek());
        System.out.println(myStack.peek());

        /*System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        System.out.println(myStack.pop());
        //System.out.println(myStack.pop());*/


        /*Stack<Integer> stack = new Stack<>();
        // 向栈中放入元素
        stack.push(12);
        stack.push(23);
        stack.push(34);
        //删除栈顶元素
        int x = stack.pop();
        System.out.println(x);
        // 获取栈顶元素
        int x2=stack.peek();
        System.out.println(x2);
        // 判断栈是否为空
        System.out.println(stack.empty());*/
    }
}
